<!--
  Created by IntelliJ IDEA.
  UserManage: Dai
  Date: 2018/4/2
  Time: 11:30
  Remark: 系统监控内嵌页面-PCS级(不启用装饰器)
  To change this template use File | Settings | File Templates.
-->
<!DOCTYPE html>
<html lang="en" layout:decorate="~{default/just_css_and_js}" xmlns:layout="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <!--echarts-->
    <script src="/js/echarts.min.js"></script>
    <!-- datepicker 时间选择器 -->
    <link href="/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
    <script src="/js/bootstrap-datetimepicker.min.js"></script>
    <script src="/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script>
        /**
         * 限制开始时间和结束时间不能互相超过
         */
        $(function () {
            $("#start_time_select").datetimepicker({
                bootcssVer: 3,   //设置读取bootstrap3，否则默认读取bootstrap2，左右箭头会不见
                startView: 2,
                format: "yyyy-mm-dd",
                minView: "month",
                todayBtn: "linked",
                todayHighlight: true,
                language: "zh-CN",
                showMeridian: true,
                autoclose: true,
                endDate: new Date()
            }).on('changeDate', function (ev) {
                var starttime = $("#start_time_select").val();
                $("#end_time_select").datetimepicker('setStartDate', starttime);
                change_data_type_of_date();
            });
            $("#end_time_select").datetimepicker({
                bootcssVer: 3,   //设置读取bootstrap3，否则默认读取bootstrap2，左右箭头会不见
                startView: 2,
                minView: "month",
                format: "yyyy-mm-dd",
                todayBtn: "linked",
                todayHighlight: true,
                language: "zh-CN",
                autoclose: true,
                showMeridian: true,
                endDate: new Date()
            }).on('changeDate', function (ev) {
                var endtime = $("#end_time_select").val();
                $("#start_time_select").datetimepicker('setEndDate', endtime);
                change_data_type_of_date();
            });
        });

        /**
         * 根据自定义的天数决定是否显示小时
         */
        function change_data_type_of_date() {
            var starttime = $("#start_time_select").val();
            var endtime = $("#end_time_select").val();
            $("#data_freque").empty();
            var str = "";
            var cha = GetDateDiff(starttime, endtime);
            console.log(cha);
            if (cha > 8) {
                str = '<button type="button" class="btn btn-choose-red active">日</button>';
            } else {
                str = '<button type="button" class="btn btn-choose-red active">日</button><button type="button" class="btn btn-choose-red">小时</button>';
            }
            $("#data_freque").prepend(str);
            change_data_type($(this));
            $('#data_freque button').click(function (e) {
                change_data_type($(this));
            });
        }

        /**
         * 计算两个日期之间的相距天数
         */
        function GetDateDiff(starttime, endtime) {
            var startTime = new Date(Date.parse(starttime.replace(/-/g, "/"))).getTime();
            var endTime = new Date(Date.parse(endtime.replace(/-/g, "/"))).getTime();
            var dates = Math.abs((startTime - endTime)) / (1000 * 60 * 60 * 24);
            return dates;
        }
    </script>
    <!--页面样式-->
    <style>
        table {
            border: 0 !important;
        }
        tr {
            border: 0 !important;
        }
        #work_status button{
            width: 72px;
            float: left;
            padding: 4px 0;
        }
        #realtime_alarm button{
            display: block;
            padding: 4px 0;
            width: 100%;
        }
        #control_panel .btn{
            border: 1px solid black !important;
            border-radius: 5px !important;
            color: black !important;
            background-color: white !important;
            margin: 5px;
        }
    </style>
    <!--页面上的一些js-->
    <script>
        /**
         * 历史查询中的button
         */
        var str_1 =
            '<button type="button" class="btn btn-choose-red active">replace_this</button>';
        var str_other =
            '<button type="button" class="btn btn-choose-red">replace_this</button>';

        /**
         * 点击切换tab页面
         * @param e
         */
        function changeTab(e) {
            // 1. 切换活跃状态
            $(e).parent().siblings().removeClass("active");
            $(e).parent().addClass("active");
            // 2. 根据id显示页面
            var id = $(e).attr("id").replace("title", "step");
            $("#" + id).siblings().hide();
            $("#" + id).show();
        }

        /**
         * 图表
         */
        $(function () {
            /**
             * 历史数据中的图表
             */
            echarts.init(document.getElementById('search_history')).setOption({
                title: {                // 标题
                    left: 'center',
                    top: '3%',
                    text: '大拇指商业广场 <2017-11-14~2017-11-14> 充电量'
                },
                grid: {                 // 设置边距
                    left: '0%',
                    right: '3%',
                    bottom: '10%',
                    containLabel: true  // 是否包含显示的刻度
                },
                tooltip: {              // 提示框组件
                    trigger: 'axis'     // 触发类型 axis坐标轴触发
                },
                legend: {               // 图例
                    data: ['A相电流', 'B相电流', 'C相电流'],
                    x: 'center',        //中间
                    y: 'bottom'         //下方
                },
                toolbox: {              // 工具栏
                    show: true,
                    top: '3%',
                    feature: {
                        dataView: {readOnly: false},        //数据视图
                        magicType: {type: ['line', 'bar']}, //变换类型
                        restore: {},                        //刷新
                        saveAsImage: {}                     //保存图片
                    }
                },
                xAxis: {                // x轴
                    type: 'category',
                    boundaryGap: false,  //坐标轴两边留白，如果是false就是0点在y轴上
                    data: ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00']
                },
                yAxis: [
                    {
                        name: '单位(A)',
                        type: 'value',
                        boundaryGap: true,
                        // min: 0,
                        max: function (value) {
                            return value.max + 100;
                        }
                    }
                ],
                series: [
                    {
                        name: 'A相电流',
                        type: 'line',
                        data: [200, 220, 223.5, 300, 395.6, 654.2, 824.3, 725.4, 542.8]
                    },
                    {
                        name: 'B相电流',
                        type: 'line',
                        data: [212.3, 234, 263.5, 350.8, 365.6, 674.2, 854.3, 715.4, 562.8]
                    },
                    {
                        name: 'C相电流',
                        type: 'line',
                        data: [232.3, 222, 243.5, 330.8, 368.6, 634.2, 894.3, 765.4, 512.8]
                    }
                ]
            });
        });

        /**
         * 初始化页面
         */
        $(function () {
            /**
             * 除了第一个其他的页面都不显示
             */
            $("#default-step-0").show().siblings().hide();
            $("#time_select").hide();
            /**
             * 历时查询 中 按钮点击事件
             */
            button_click();
            /**
             * 绑定台账信息的修改页面的input框的样式修改
             */
            input_on_focus();
        });

        /**
         * 历时查询 中 按钮点击事件
         */
        function button_click() {
            /**
             * 测点类型
             */
            $('#test_type button').click(function (e) {
                change_test_name($(this))
            });
            /**
             * 测点名称
             */
            $('#test_name button').click(function (e) {
                $(this).addClass('active').siblings().removeClass('active');
            });
            /**
             * 时间范围
             */
            $('#time_ranges button').click(function (e) {
                change_data_freque($(this));
            });
            /**
             * 显示密度
             */
            $('#data_freque button').click(function (e) {
                change_data_type($(this));
            });
            /**
             * 显示类别
             */
            $('#data_type button').click(function (e) {
                $(this).addClass('active').siblings().removeClass('active');
            });
        }
        /**
         * 当测点类型改变时，改变对应的测点名称
         */
        function change_test_name(button) {
            $(button).addClass('active').siblings().removeClass('active');
            var text = $(button).text();
            $("#test_name").empty();
            var str = "";
            switch (text) {
                case "能量":
                    str = str_1.replace("replace_this", "当天充电量") + str_other.replace("replace_this", "当天放电量") + str_other.replace("replace_this", "总放电量") + str_other.replace("replace_this", "总充电量(多选)");
                    break;
                case "电压":
                    str = str_1.replace("replace_this", "AB线电压") + str_other.replace("replace_this", "BC线电压") + str_other.replace("replace_this", "CA线电压") + str_other.replace("replace_this", "直流母线电压(多选)");
                    break;
                case "电流":
                    str = str_1.replace("replace_this", "A相电流") + str_other.replace("replace_this", "B相电流") + str_other.replace("replace_this", "C相电流") + str_other.replace("replace_this", "直流母线电流(多选)");
                    break;
                case "功率":
                    str = str_1.replace("replace_this", "有功功率") + str_other.replace("replace_this", "无功功率") + str_other.replace("replace_this", "功率因数") + str_other.replace("replace_this", "直流功率(多选)");
                    break;
                case "温度":
                    str = str_1.replace("replace_this", "功率模块温度");
                    break;
            }
            $("#test_name").prepend(str);
            $('#test_name button').click(function (e) {
                $(this).addClass('active').siblings().removeClass('active');
            });
        }
        /**
         * 当时间范围变化时，变化显示密度
         */
        function change_data_freque(button) {
            $(button).addClass('active').siblings().removeClass('active');
            var text = $(button).text();
            $("#data_freque").empty();
            var str = "";
            switch (text) {
                case "日":
                    str = str_1.replace("replace_this", "小时") + str_other.replace("replace_this", "15分钟");
                    $("#time_select").hide();
                    break;
                case "周":
                    str = str_1.replace("replace_this", "日") + str_other.replace("replace_this", "小时");
                    $("#time_select").hide();
                    break;
                case "月":
                    str = str_1.replace("replace_this", "日");
                    $("#time_select").hide();
                    break;
                case "年":
                    str = str_1.replace("replace_this", "月");
                    $("#time_select").hide();
                    break;
                case "自定义":
                    str = str_1.replace("replace_this", "日") + str_other.replace("replace_this", "小时");
                    $("#time_select").show();
                    break;
            }
            $("#data_freque").prepend(str);
            change_data_type($(this));
            $('#data_freque button').click(function (e) {
                change_data_type($(this));
            });
        }
        /**
         * 当显示密度变化时，变化显示类别
         */
        function change_data_type(button) {
            $(button).addClass('active').siblings().removeClass('active');
            var text = $(button).text();
            if (text == '15分钟') {
                $("#data_type").empty();
                $("#data_type").prepend(str_1.replace("replace_this", "瞬态值"));
            } else {
                if ($("#data_type").children().size() != 3) {
                    var str = str_1.replace("replace_this", "平均值") + str_other.replace("replace_this", "最大值") + str_other.replace("replace_this", "最小值");
                    $("#data_type").empty();
                    $("#data_type").prepend(str);
                }
            }
            /**
             * 显示类别
             */
            $('#data_type button').click(function (e) {
                $(this).addClass('active').siblings().removeClass('active');
            });
        }

        /**
         * 绑定台账信息的修改页面的input框的样式修改
         */
        function input_on_focus(){
            $("#save_change").hide();
            $("#default-step-2").find("input").on("click", function () {
                $("#default-step-2").find("input").css({
                    "border":"1px solid #b5b5b5",
                    "padding":"6px",
                    "margin-top": "3px",
                    "margin-bottom": "3px",
                });
            });
            $("#default-step-2").find("input").on("change", function () {
                $("#save_change").show();
            });
        }
    </script>
</head>
<body>
<div layout:fragment="content">
    <div class="main-content-inner">
        <input type="hidden" id="id" th:value="${id}">
        <!--面包屑导航栏-->
        <ul class="breadcrumb">
            <li>
                <a href="#">系统监控</a>
            </li>
            <li class="active" th:text="${parentName}"></li>
            <li class="active" th:text="${name}"></li>
        </ul>
        <!-- 标题tab -->
        <ul class="nav nav-tabs">

            <li role="presentation" class="active"><a href="#" onclick="changeTab(this)" id="default-title-0">实时数据</a>
            </li>
            <li role="presentation"><a href="#" onclick="changeTab(this)" id="default-title-1">历史数据</a></li>
            <li role="presentation"><a href="#" onclick="changeTab(this)" id="default-title-2">设备台帐</a></li>
        </ul>
        <!-- 内容显示 -->
        <div>
            <!--实时监控-->
            <form id="default-step-0" class="container-fluid modal-body">
                <!--实时数据-->
                <fieldset>
                    <legend>实时数据</legend>
                    <div class="col-sm-3">
                        <label class="col-sm-6">当天充电量</label>
                        <span class="col-sm-6"></span>kWh
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">有功功率</label>
                        <span class="col-sm-6"></span>kW
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">AB线电压</label>
                        <span class="col-sm-6"></span>V
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">A相电流</label>
                        <span class="col-sm-6"></span>A
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">当天放电量</label>
                        <span class="col-sm-6"></span>kWh
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">无功功率</label>
                        <span class="col-sm-6"></span>kvar
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">BC线电压</label>
                        <span class="col-sm-6"></span>V
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">B相电流</label>
                        <span class="col-sm-6"></span>A
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">总放电量</label>
                        <span class="col-sm-6"></span>kWh
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">功率因数</label>
                        <span class="col-sm-6"></span>&nbsp;
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">CA线电压</label>
                        <span class="col-sm-6"></span>V
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">C相电流</label>
                        <span class="col-sm-6"></span>A
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">总充电量</label>
                        <span class="col-sm-6"></span>kWh
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">直流功率</label>
                        <span class="col-sm-6"></span>kW
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">直流母线电压</label>
                        <span class="col-sm-6"></span>V
                    </div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">直流母线电流</label>
                        <span class="col-sm-6"></span>A
                    </div>
                    <div class="col-sm-3"></div>
                    <div class="col-sm-3">
                        <label class="col-sm-6">功率模块温度</label>
                        <span class="col-sm-6"></span>
                    </div>
                </fieldset>
                <!--实时状态-->
                <fieldset id="work_status">
                    <legend>实时状态</legend>
                    <!--工作状态-->
                    <div class="col-sm-6">
                        <label class="col-sm-3">工作状态</label>
                        <div class="col-sm-9">
                            <div class="btn-group btn-group-sm btn-group-justified">
                                <button type="button" class="btn-white-black-red" disabled>关机</button>
                                <button type="button" class="btn-white-black-red" disabled>软起</button>
                                <button type="button" class="btn-white-black-red" disabled>待机</button>
                                <button type="button" class="btn-white-black-red" disabled>故障</button>
                            </div>
                            <div class="btn-group btn-group-sm btn-group-justified" style="margin-top: 10px">
                                <button type="button" class="btn-white-black-red active" disabled>直流恒压</button>
                                <button type="button" class="btn-white-black-red" disabled>直流恒流</button>
                                <button type="button" class="btn-white-black-red" disabled>交流恒功率</button>
                                <button type="button" class="btn-white-black-red" disabled>离网</button>
                            </div>
                        </div>
                    </div>
                    <div style="width: 25%; float: left">
                        <!--交流断路器-->
                        <div>
                            <label style="width: 30%;">交流断路器</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>闭合</button>
                                <button type="button" class="btn-white-black-red" disabled>断开</button>
                            </div>
                        </div>
                        <!--交流接触器-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">交流接触器</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>闭合</button>
                                <button type="button" class="btn-white-black-red" disabled>断开</button>
                            </div>
                        </div>
                        <!--启停开关-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">启停开关</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>启动</button>
                                <button type="button" class="btn-white-black-red" disabled>停止</button>
                            </div>
                        </div>
                        <!--急停开关-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">急停开关</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red" disabled>拍下</button>
                                <button type="button" class="btn-white-black-red active" disabled>未拍下</button>
                            </div>
                        </div>
                    </div>
                    <div style="width: 25%; float: left">
                        <!--直流断路器-->
                        <div>
                            <label style="width: 30%;">直流断路器</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>闭合</button>
                                <button type="button" class="btn-white-black-red" disabled>断开</button>
                            </div>
                        </div>
                        <!--直流熔断器-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">直流熔断器</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>闭合</button>
                                <button type="button" class="btn-white-black-red" disabled>断开</button>
                            </div>
                        </div>
                        <!--直流接触器-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">直流接触器</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>闭合</button>
                                <button type="button" class="btn-white-black-red" disabled>断开</button>
                            </div>
                        </div>
                        <!--散热风机-->
                        <div style="margin-top: 10px">
                            <label style="width: 30%;">散热风机</label>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn-white-black-red active" disabled>启动</button>
                                <button type="button" class="btn-white-black-red" disabled>停止</button>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <!--控制指令面板-->
                <fieldset id="control_panel">
                    <legend>控制指令面板</legend>
                    <div style="width: 45%; display: inline-block; margin-left: 32px">
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">打开XXX继电器</button>
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">关闭XXX继电器</button>
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">打开XXX继电器</button>
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">关闭XXX继电器</button>
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">打开XXX继电器</button>
                        <button type="button" style="width: 45%; margin-top: 10px" class="btn">关闭XXX继电器</button>
                    </div>
                    <fieldset style="width: 50%; margin: 0 auto; float: right;">
                        <legend>充放电控制</legend>
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label class="control-label">时长(S)</label>
                                <input type="text" value="100">
                                <button type="button" class="btn btn-sm">充电</button>
                                <button type="button" class="btn btn-sm">放电</button>
                            </div>
                        </div>
                    </fieldset>
                </fieldset>
                <!--实时报警-->
                <fieldset id="realtime_alarm">
                    <legend>实时报警</legend>
                    <div class="btn-group-vertical col-sm-1" style="width: 20%">
                        <button type="button" class="btn-white-black-red active" disabled>EPO故障</button>
                        <button type="button" class="btn-white-black-red" disabled>IGBT硬件过流</button>
                        <button type="button" class="btn-white-black-red" disabled>母线硬件过压</button>
                        <button type="button" class="btn-white-black-red" disabled>母线硬件过流</button>
                        <button type="button" class="btn-white-black-red" disabled>交流硬件过压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流硬件过流</button>
                        <button type="button" class="btn-white-black-red" disabled>电感持续逐波限流</button>
                    </div>
                    <div class="btn-group-vertical col-sm-1" style="width: 20%">
                        <button type="button" class="btn-white-black-red active" disabled>辅助电源故障</button>
                        <button type="button" class="btn-white-black-red" disabled>单板连接故障</button>
                        <button type="button" class="btn-white-black-red" disabled>直流熔丝故障</button>
                        <button type="button" class="btn-white-black-red" disabled>交流熔丝故障</button>
                        <button type="button" class="btn-white-black-red" disabled>直流防雷器故障</button>
                        <button type="button" class="btn-white-black-red" disabled>交流防雷器故障</button>
                        <button type="button" class="btn-white-black-red" disabled>磁性元件过温故障</button>
                    </div>
                    <div class="btn-group-vertical col-sm-1" style="width: 20%">
                        <button type="button" class="btn-white-black-red active" disabled>交流线电压AB过压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流线电压BC过压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流线电压CA过压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流线电压AB欠压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流线电压BC欠压</button>
                        <button type="button" class="btn-white-black-red" disabled>交流线电压CA欠压</button>
                    </div>
                    <div class="btn-group-vertical col-sm-1" style="width: 20%">
                        <button type="button" class="btn-white-black-red active" disabled>交流过频</button>
                        <button type="button" class="btn-white-black-red" disabled>交流欠频</button>
                        <button type="button" class="btn-white-black-red" disabled>交流相序故障</button>
                        <button type="button" class="btn-white-black-red" disabled>交流A相过流</button>
                        <button type="button" class="btn-white-black-red" disabled>交流B相过流</button>
                        <button type="button" class="btn-white-black-red" disabled>交流C相过流</button>
                        <button type="button" class="btn-white-black-red" disabled>交流电压不平衡</button>
                    </div>
                    <div class="btn-group-vertical col-sm-1" style="width: 20%">
                        <button type="button" class="btn-white-black-red active" disabled>预充电母线过压</button>
                        <button type="button" class="btn-white-black-red" disabled>预充电母线欠压</button>
                        <button type="button" class="btn-white-black-red" disabled>不控整流母线过压</button>
                        <button type="button" class="btn-white-black-red" disabled>不控整流母线欠压</button>
                        <button type="button" class="btn-white-black-red" disabled>直流母线过压</button>
                        <button type="button" class="btn-white-black-red" disabled>直流母线欠压</button>
                        <button type="button" class="btn-white-black-red" disabled>直流母线过流</button>
                    </div>
                </fieldset>
            </form>
            <!--历史查询-->
            <div id="default-step-1">
                <form style="margin-top: 10px" class="col-sm-12">
                    <div>
                        <label style="margin-right: 15px">测点类别</label>
                        <div id="test_type" class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-choose-red active">能量</button>
                            <button type="button" class="btn btn-choose-red">电压</button>
                            <button type="button" class="btn btn-choose-red">电流</button>
                            <button type="button" class="btn btn-choose-red">功率</button>
                            <button type="button" class="btn btn-choose-red">温度</button>
                        </div>
                    </div>
                    <div>
                        <label style="margin-right: 15px">测点名称</label>
                        <div id="test_name" class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-choose-red active">当天充电量</button>
                            <button type="button" class="btn btn-choose-red">当天放电量</button>
                            <button type="button" class="btn btn-choose-red">总放电量</button>
                            <button type="button" class="btn btn-choose-red">总充电量(多选)</button>
                        </div>
                    </div>
                    <div>
                        <label style="margin-right: 15px">时间范围</label>
                        <div id="time_ranges" class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-choose-red active">日</button>
                            <button type="button" class="btn btn-choose-red">周</button>
                            <button type="button" class="btn btn-choose-red">月</button>
                            <button type="button" class="btn btn-choose-red">年</button>
                            <button type="button" class="btn btn-choose-red">自定义</button>
                            <div style="display: inline-block" id="time_select">
                                <input class="form_date"
                                       style="height: 30px; background-color: white !important; border-radius: 5px !important"
                                       type="text" placeholder="开始时间"
                                       id="start_time_select" data-link-field="start_time" data-link-format="yyyy-mm-dd"
                                       readonly>
                                <span>至</span>
                                <input class="form_date"
                                       style="height: 30px; background-color: white !important; border-radius: 5px !important"
                                       type="text" placeholder="结束时间"
                                       id="end_time_select" data-link-field="end_time" data-link-format="yyyy-mm-dd"
                                       readonly>
                                <input type="hidden" id="start_time" name="start_time">
                                <input type="hidden" id="end_time" name="end_time">
                            </div>
                        </div>
                    </div>
                    <div>
                        <label style="margin-right: 15px">显示密度</label>
                        <div id="data_freque" class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-choose-red active">小时</button>
                            <button type="button" class="btn btn-choose-red">15分钟</button>
                        </div>
                    </div>
                    <div>
                        <label style="margin-right: 15px">显示类别</label>
                        <div id="data_type" class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-choose-red active">平均值</button>
                            <button type="button" class="btn btn-choose-red">最小值</button>
                            <button type="button" class="btn btn-choose-red">最大值</button>
                        </div>
                    </div>
                </form>
                <div id="search_history" class="col-sm-12"
                     style="height: 400px; margin-top: 10px; border-top: 1px solid #C5D0DC;"></div>
            </div>
            <!--台帐信息-->
            <form id="default-step-2" class="container-fluid">
                <!--PCS信息-->
                <fieldset class="col-xs-12" style="margin-right: 10px;">
                    <legend>PCS信息</legend>
                    <!--PCS厂家-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">PCS厂家</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--产品型号-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">产品型号</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--额定功率(kW)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">额定功率(kW)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--电网电压(V)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">电网电压(V)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--直流侧电压(V)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">直流侧电压(V)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--最大输入功率(kW)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">最大输入功率(kW)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--电网频率(Hz)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">电网频率(Hz)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--最大容量(kVA)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">最大容量(kVA)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                    <!--最大输入电流(A)-->
                    <div class="col-sm-4">
                        <span class="col-sm-5" style="text-align: left;margin-top: 10px">最大输入电流(A)</span>
                        <input class="col-sm-6" type="text" th:value="11111">
                    </div>
                </fieldset>
                <div class="col-xs-12" style="text-align: center; margin-top: 10px;">
                    <button type="button" class="btn btn-primary btn-sm" id="save_change">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>